@echo off
echo Starting multiple-spiders application in development environment

:retry
pm2 start ecosystem.config.js --env development
if %errorlevel% neq 0 (
    echo Startup failed, retrying in 5 seconds...
    timeout /t 5 >nul
    goto retry
)

echo Application started successfully